using SkaldRogueLike.Main.Constants.Enumerations;

namespace SkaldRogueLike.Main.CellContent.Creatures
{
    public class Monster : Creature
    {
        public Condition Condition { get; set; }

        public Monster(string name, int hp, int str, int def, 
            string image, Colors color, string description = "") : base(name, image, color, description)
        {
            HP = hp;
            Att = str;
            Def = def;
        }

        public override int Attack(Creature creature)
        {
            return creature.TakeDamage(Att);
        }

        public override int TakeDamage(int attack)
        {
            var damage = attack - Def;
            damage = damage < 1 ? 1 : damage;
            HP -= damage;
            return damage;
        }
    }
}